package com.hbsd.paopaobackend.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hbsd.paopaobackend.model.domain.Apply;
import com.hbsd.paopaobackend.model.domain.User;
import com.hbsd.paopaobackend.model.request.Apply.AddApplyRequest;
import com.hbsd.paopaobackend.model.request.PageInfo;
import com.hbsd.paopaobackend.model.vo.Apply.ApplyListVO;

/**
* @author zzh
* @description 针对表【apply】的数据库操作Service

*/
public interface ApplyService extends IService<Apply> {

    /**
     * 添加申请
     * @param applyRequest
     * @param loginUser
     * @return
     */
    Boolean addApply(AddApplyRequest applyRequest, User loginUser);

    /**
     * 分页查询申请列表
     * @param pageInfo
     * @param loginUser
     * @return
     */
    Page<ApplyListVO> recommendUsers(PageInfo pageInfo, User loginUser);

    /**
     * 通过好友申请
     * @param id
     * @param loginUser
     * @return
     */
    Boolean passApply(Long id, User loginUser);

    /**
     * 拒绝好友申请
     * @param id
     * @param loginUser
     * @return
     */
    Boolean deleteApply(long id, User loginUser);
}
